#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main() {
    int a, b;
    scanf("%d %d", &a, &b);
    int result = a * b - a - b;
    printf("%d\n", result);
    return 0;
}